    import appsetting from './appsetting'
    let cachehelp = {
        
        //保存 token
        setAuthorization(token) {
            localStorage.setItem(appsetting.tokenkey, token);
        },
        //保存 Refreshtoken
        setRefreshAuthorization(token) {
            localStorage.setItem(appsetting.tokenkeyRefresh, token);
        },
        //保存 User
        setUser(Users) {
            localStorage.setItem(appsetting.Users, Users);
        },
        //获取User
        getUser(Users) {
            localStorage.getItem(appsetting.Users);
        },
        //获取 token
        getAuthorization() {
            return localStorage.getItem(appsetting.tokenkey);
        },
        //获取 Refreshtoken
        getRefreshAuthorization() {
            return localStorage.getItem(appsetting.tokenkeyRefresh);
        },
        //删除 token
        delAuthorization() {
            this.delCookie(appsetting.tokenkey);
        },
        //删除 Refreshtokentoken
        delRefreshAuthorization() {
            this.delCookie(appsetting.tokenkeyRefresh);
        }
    }

    export default cachehelp;